home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / runtime architecture / component manager / mycomponent / mycomponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.6 KB  |  52 lines

  1. /*
  2.     File:        MyComponent.h
  3.  
  4.     Contains:    simple component sample.
  5.  
  6.     Written by: John Wang    
  7.  
  8.     Copyright:    Copyright © 1994-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/28/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. #ifdef THINK_C
  25. #define        applec
  26. #endif
  27.  
  28. #define        kDEBUGME                    0
  29.  
  30. #define        kMyComponentSpec        1L
  31. #define        kMyComponentVersion        0L
  32.  
  33. typedef struct {
  34.     int        shared;
  35. } SharedGlobals;
  36.  
  37.  
  38. typedef struct    {                        
  39.     //    Component stuff
  40.     ComponentInstance    delegate;                //    keep track who we are delegating it to.
  41.     ComponentInstance    self;                    //    self instance needed if targeted
  42. } PrivateGlobals;
  43.  
  44. /* ------------------------------------------------------------------------- */
  45.  
  46. pascal ComponentResult MyOpen(ComponentInstance self);
  47. pascal ComponentResult MyClose(Handle storage,ComponentInstance self);
  48. pascal ComponentResult MyCanDo(short selector);
  49. pascal ComponentResult MyVersion(void);
  50. pascal ComponentResult MyRegister(void);
  51. pascal ComponentResult MyTarget(Handle storage, ComponentInstance self);
  52.